package com.weather.modules.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author yf.zhu
 * @since 2020-01-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("_w_weather")
public class Weather extends Model<Weather> {

    private static final long serialVersionUID = 1L;

    @TableId("city_id")
    private String cityId;

    /**
     * 城市名称
     */
    @TableField("city")
    private String city;

    /**
     * 感冒情况
     */
    @TableField("ganmao")
    private String ganmao;

    /**
     * 温度
     */
    @TableField("wendu")
    private String wendu;

    /**
     * 创建时间
     */
    @TableField("create_data")
    private LocalDateTime createData;

    /**
     * 更新时间
     */
    @TableField("update_data")
    private LocalDateTime updateData;

    @Override
    protected Serializable pkVal() {
        return this.cityId;
    }

}
